package com.hnkywl.sts.entity.jhgl;

import com.hnkywl.sts.entity.BaseEntity;
import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.Where;

import javax.persistence.*;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: ccr
 * Date: 13-5-2
 * Time: 上午10:35
 */
@Entity
@Table(name = "T_BIZ_HKJH")
@Where(clause = "deleted!='1'")
public class Hkjh extends BaseEntity {
    //ID
    @Id
    @SequenceGenerator(name = "seqHkjh", allocationSize = 1, sequenceName = "SEQ_BIZ_HKJH")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seqHkjh")
    private Long id;

    private Integer nf;

    private Integer yf;

    private Long gsid;

    private String bz;

    private String jhdh;

    @OneToMany(fetch = FetchType.LAZY)
    @Cascade({org.hibernate.annotations.CascadeType.SAVE_UPDATE})
    @JoinColumn(name = "HKJH_ID")
    private List<Hkjhmx> hkjhmxList;

//    /**
//     * 计划类型 zddh:直达到货  kcxs:库存销售 kcls:库存零售
//     */
//    private String type;
//    /**
//     * 回款日期计算方式   fhsj:按发货时间计算   yfksj:按预付款时间
//     */
//    private String jsfs;
//    /**
//     * 回款时间
//     */
//    private Date hksj;
//    /**
//     * 计划回款金额
//     */
//    private Double jhhkje = 0D;
//    /**
//     * 销售公司
//     */
//    @ManyToOne(fetch = FetchType.LAZY)
//    @JoinColumn(name = "XSGS_ID")
//    @NotFound(action = NotFoundAction.IGNORE)
//    private Nbgs xsgs;
//    /**
//     * 销售部门
//     */
//    @ManyToOne(fetch = FetchType.LAZY)
//    @JoinColumn(name = "XSBM_ID")
//    @NotFound(action = NotFoundAction.IGNORE)
//    private Nbbm xsbm;
//    /**
//     * 客户
//     */
//    @ManyToOne(fetch = FetchType.LAZY)
//    @JoinColumn(name = "KH_ID")
//    @NotFound(action = NotFoundAction.IGNORE)
//    private Gsjg kh;
//    /**
//     * 绑定的合同
//     */
//    @ManyToOne(fetch = FetchType.LAZY)
//    @JoinColumn(name = "XSHT_ID")
//    @NotFound(action = NotFoundAction.IGNORE)
//    private Xsht xsht;
//    /**
//     * 绑定的销售单
//     */
//    @ManyToOne(fetch = FetchType.LAZY)
//    @JoinColumn(name = "XSD_ID")
//    @NotFound(action = NotFoundAction.IGNORE)
//    private Xsd xsd;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getNf() {
        return nf;
    }

    public void setNf(Integer nf) {
        this.nf = nf;
    }

    public Integer getYf() {
        return yf;
    }

    public void setYf(Integer yf) {
        this.yf = yf;
    }

    public Long getGsid() {
        return gsid;
    }

    public void setGsid(Long gsid) {
        this.gsid = gsid;
    }

    public String getBz() {
        return bz;
    }

    public void setBz(String bz) {
        this.bz = bz;
    }

    public String getJhdh() {
        return jhdh;
    }

    public void setJhdh(String jhdh) {
        this.jhdh = jhdh;
    }

    public List<Hkjhmx> getHkjhmxList() {
        return hkjhmxList;
    }

    public void setHkjhmxList(List<Hkjhmx> hkjhmxList) {
        this.hkjhmxList = hkjhmxList;
    }
}
